<template>
  <div>
    <!-- 第一个*arry -->

    <!-- <DogHarry />
    <DogHarry /> -->

    <!-- 第二个*arry -->
    <!-- <DogHarryTwo
      v-for="(item, index) in arr"
      :key="index"
      :imgUrl="item.dogImgUrl"
      :dogName="item.dogName"
    /> -->

    <!-- 第三个*arry -->
    <DogHarry
      v-for="(item, index) in arr"
      :key="index"
      :imgUrl="item.dogImgUrl"
      :dogName="item.dogName"
      @love="fn"
    />
    <div>
      <ul>
        <p>想对*arry嗯嗯啊啊~~的狗子：</p>
        <li v-for="(item, index) in love" :key="index">{{item}}</li>
      </ul>
    </div>
  </div>
</template>

<script>
//  第一个*arry

// import DogHarry from './components3day/dogHarry.vue'
// export default {
//     components:{
//         DogHarry
//     }
// };

// 第二个*arry
// import DogHarryTwo from "./components3day/dogHarry2.vue";
// export default {
//   components: {
//     DogHarryTwo,
//   },
//   data() {
//     return {
//       arr: [
//         {
//           dogImgUrl:
//             "https://img0.baidu.com/it/u=2886983155,1078292078&fm=253&fmt=auto&app=138&f=JPEG?w=613&h=500",
//           dogName: "博美",
//         },
//         {
//           dogImgUrl:
//             "https://img2.baidu.com/it/u=1027520767,1284758521&fm=253&fmt=auto&app=138&f=JPEG?w=422&h=508",
//           dogName: "泰迪",
//         },
//         {
//           dogImgUrl:
//             "https://img2.baidu.com/it/u=3089461740,2997503159&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=617",
//           dogName: "金毛",
//         },
//         {
//           dogImgUrl:
//             "https://img1.baidu.com/it/u=1692198762,763804401&fm=253&fmt=auto&app=138&f=JPEG?w=279&h=303",
//           dogName: "哈士奇",
//         },
//         {
//           dogImgUrl:
//             "https://img2.baidu.com/it/u=2881906081,2563875946&fm=253&fmt=auto&app=138&f=JPEG?w=300&h=296",
//           dogName: "阿拉斯加",
//         },
//         {
//           dogImgUrl:
//             "https://img0.baidu.com/it/u=1134668220,1407290898&fm=253&fmt=auto&app=138&f=JPEG?w=550&h=455",
//           dogName: "萨摩耶",
//         },
//       ],
//     };
//   },
// };

import DogHarry from "./dogHarry3.vue";
export default {
  components: {
    DogHarry,
  },
  data() {
    return {
      arr: [
        {
          dogImgUrl:
            "https://img0.baidu.com/it/u=2886983155,1078292078&fm=253&fmt=auto&app=138&f=JPEG?w=613&h=500",
          dogName: "博美",
        },
        {
          dogImgUrl:
            "https://img2.baidu.com/it/u=1027520767,1284758521&fm=253&fmt=auto&app=138&f=JPEG?w=422&h=508",
          dogName: "泰迪",
        },
        {
          dogImgUrl:
            "https://img2.baidu.com/it/u=3089461740,2997503159&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=617",
          dogName: "金毛",
        },
        {
          dogImgUrl:
            "https://img1.baidu.com/it/u=1692198762,763804401&fm=253&fmt=auto&app=138&f=JPEG?w=279&h=303",
          dogName: "哈士奇",
        },
        {
          dogImgUrl:
            "https://img2.baidu.com/it/u=2881906081,2563875946&fm=253&fmt=auto&app=138&f=JPEG?w=300&h=296",
          dogName: "阿拉斯加",
        },
        {
          dogImgUrl:
            "https://img0.baidu.com/it/u=1134668220,1407290898&fm=253&fmt=auto&app=138&f=JPEG?w=550&h=455",
          dogName: "萨摩耶",
        },
      ],
      love: [],
    };
  },
  methods: {
    fn(dogName) {
      this.love.push(dogName);
    },
  },
};
</script>

<style>
/* 第一个*arry */

/* div{
    float: left;;
} */

/* 第二个*arry
    无 */
</style>